//fl.closeAll();

var path = "file:///E|/workspace/aswing/";

var mainDoc;

var docs = fl.documents;
for (var i = 0; i < docs.length; i ++ ) {
    if(docs[i].name == "main.fla") {
        mainDoc = docs[i];
    } else {
        compile(docs[i]);
    }
}
compile(mainDoc);

//编译文档
function compile(doc) {
    alert(doc.name);
    doc.exportSWF(doc.name+".swf", true);
    //fl.tools.keyDown(17);
    //fl.tools.keyDown(13);
}  
